import scrapy
from scrapy.http import HtmlResponse, Request


# 定义爬虫程式, scrapy crawl comicsSpider -o hanime-log.csv
class ComicsspiderSpider(scrapy.Spider):
    name = "comicsSpider"
    # allowed_domains = ["hanime1.me", "i.nhentai.net"]
    # start_urls = ['https://hanime1.me/comic/106640/1']
    allowed_domains = ["movie.douban.com"]
    start_urls = ['https://movie.douban.com/top250']

    # 解析网页内容
    def parse(self, response: HtmlResponse, **kwargs):
        #print(response.body)
        movie_item = {}
        yield movie_item